<!--
 * @Author: hucc
 * @Date: 2021-10-08 15:07:04
 * @LastEditors: hucc
 * @LastEditTime: 2021-10-08 19:57:04
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>再见vue</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.13/vue.js"></script>
</head>

<body>
    <div id="app">
        {{msg}}
    </div>
    <script>
        let vm = new Vue({
            //当前vue实例的配置项
            el: '#app',
            data: {
                msg: 'hello vue'
            },
            methods: {
                findAllCategories() {
                    console.log('查询所有栏目信息')
                }
            },
            created() {
                //this指代vue实例vm
                this.findAllCategories();
            }

        })
    </script>
</body>

</html>